home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 9
/
Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO
/
018a
/
zip2zi31.zip
/
ZIP2-001.BAT
< prev
next >
Wrap
DOS Batch File
|
1993-05-31
|
4KB
|
76 lines
@Echo off
Rem ZIP2-001.BAT Initial System Evaluation/Query For Evars and Files.
IF NOT Exist ZIP2-FSZ.BAT Echo ZIP2-FSZ.BAT is Also Required for these tests.
IF NOT Exist ZIP2-FSZ.BAT GoTo TRY_AGAIN
CLS
Echo Your System Is Safe To Run ZIP2ZIP If No Reserved Variables Are In Use,
Echo No Reserved FileNames Are In Use, And Environment Is Reported as OK.
Echo.
Echo For Any In Use, Find Out If They Can Be Safely Eliminated For Now.
Echo And If So, Run ZiP2-OK2.BAT To Clear.
Echo.
IF NOT "%FSIZE%"=="" Echo Environment Variable "FSIZE" In Use as "%FSIZE%"
IF NOT "%ZDATE%"=="" Echo Environment Variable "ZDATE" In Use as "%ZDATE%"
IF NOT "%ZTIME%"=="" Echo Environment Variable "ZTIME" In Use as "%ZTIME%"
IF NOT "%ZNAME%"=="" Echo Environment Variable "ZNAME" In Use as "%ZNAME%"
IF NOT "%CNZL%"=="" Echo Environment Variable "CNZL" In Use as "%CNZL%"
IF NOT "%EVCHK40%"=="" Echo Environment Variable "EVCHK40" In Use as "%EVCHK40%"
IF NOT "%EVCHK30%"=="" Echo Environment Variable "EVCHK30" In Use as "%EVCHK30%"
IF NOT "%SAFETY%"=="" Echo Environment Variable "SAFETY" In Use as "%SAFETY%"
IF NOT "%DONE_B%"=="" Echo Environment Variable "DONE_B" In Use as "%DONE_B%"
IF NOT "%DONE_C%"=="" Echo Environment Variable "DONE_C" In Use as "%DONE_C%"
For %%f IN (Temp_$$$.BAT ZIP2-FSZ. ZIP2-FSZ.$$$ ZIP2ZIP.$$$ EV0.FLG) DO IF Exist %%f Echo File "%%f" Is Present
For %%f IN (#2DO_B. #2DO_C. #AT_B. #AT_C. #DONE_B. #DONE_C. ) DO IF Exist %%f Echo File "%%f" Is Present
Echo.
CALL ZIP2ZIPA.BAT
Echo Now Testing ATTRIB +r +h +s /S
Echo.
Md Z_B
Cd Z_B
Echo a > ReadOnly.Fle
ATTRIB ReadOnly.Fle +r +h +s
Cd..
ATTRIB ReadOnly.Fle -r -h -s /S
Cd Z_B
DEL ReadOnly.Fle >NUL
IF NOT Exist ReadOnly.Fle Echo Current DOS's ATTRIB.EXE IS Suitable For ZIP2ZIP, If No Syntax Msgs.
IF NOT Exist ReadOnly.Fle GoTo FIND&COMP
Echo Current DOS's ATTRIB.EXE Not Suitable For ZIP2ZIP
Attrib ReadOnly.fle -r -h -s
Del ReadOnly.Fle >Nul
Echo.
Echo Any Syntax Error Message Indicates That The Attrib.Exe is Not Suitable
Echo For Use With .ZIP Files That May Contain Files Of These Attributes.
Echo If +r +h +s Files Are Encountered And Not Cleaned Up, They Will
Echo Be Included In ALL Subsequent .ZIPS! BE VERY CAREFUL OF THIS OPTION.
Echo Older Dos Vers Could Only Set The +-r Attribute. This Test Attempted
Echo To Set +r +h +s And Then Turn Them Off.
Echo.
:FIND&COMP
CD..
RD Z_B
Echo.
Echo Testing FIND and COMP
IF Exist ZIP2-FSZ. Echo File ZIP2-FSZ. is Present..Resolve and Rerun %0
IF Exist ZIP2-FSZ. GoTo TRY_AGAIN
Echo aaa>ZIP2-FSZ.
Copy ZIP2-FSZ. ZIP2-FSZ.$$$ >Nul
Echo N| Comp ZIP2-FSZ. ZIP2-FSZ.$$$ | Find "OK" >ZIP2-FSZ.
CALL ZIP2-FSZ.BAT
Echo.
IF "%FSIZE%"=="" GoTo MajorError
IF NOT "%FSIZE%"=="0" Echo Your DOS Handles COMP and FIND Correctly
IF "%FSIZE%"=="0" Echo Your DOS Handles COMP and FIND INCORECTLY! See .Doc.
For %%f IN (ZIP2-FSZ. ZIP2-FSZ.$$$) Do IF Exist %%f DEL %%f >NUL
IF "%PKTMP%"=="" Echo And..You Might Want To Consider Setting PKTMP To a FastDrive. See PKWARE's .doc
IF NOT "%PKTMP%"=="" Echo And.. PKTMP Is Currently Set To: %PKTMP%
GoTo End
:MajorError
Echo Major Error in Logic or DOS System Cmds.
:End
Echo.
Echo If Environment Variables Do NOT "Belong" To THIS Program..Quit and FIX
Echo Then Run ZIP2-OK2.BAT To Clear The Variables and Files.
Echo IF SubDir Z_B Was Left By "Attrib Failure" Delete it. Run ZIPRDZ_B.BAT
:TRY_AGAIN